package timeslice
{
	import flash.display.Bitmap;
	
	import global.$talkScene;
	
	import slices.TimeSlice;
	import globals.$athena;
	
	public class ChangeTalkBackground extends TimeSlice
	{
		public var bg:Bitmap;
		
		public function ChangeTalkBackground(v:Bitmap)
		{
			super();
			bg = v;
		}
		
		override public function onStart():void {
			var ts:TimeSlice = $talkScene.bg.changeTo(bg);
			ts.appendNext(new Function(onChange));
			$athena.addTimeSlice(ts);
		}
		
		private public function onChange():void {
			isEnd = true;
		}
	}
}